//
//  CityViewController.m
//  HunBa.
//
//  Created by mohe001 on 16/6/1.
//  Copyright © 2016年 fubang. All rights reserved.
//

#import "CityViewController.h"
#import "CityTableViewCell.h"
#import "ZzCoverFlow.h"
#import "InfiniteScrollPicker.h"
#import "ILSideScrollView.h"
#import "ILSideScrollViewItem.h"
#import "CityTwoTableViewCell.h"
@interface CityViewController (){
    InfiniteScrollPicker *isp3;
    
}


@end

@implementation CityViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    if (section == 0) {
        return 1;
    }else{
        return 5;
    }
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:( NSIndexPath *)indexPath
{
    if (indexPath.section == 0) {
        return 222;
    }else{
        return 100;
    }
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.section == 0) {
            CityTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CityTableViewCell"];
            if (cell == nil) {
                cell = [[[NSBundle mainBundle] loadNibNamed:@"CityTableViewCell" owner:self options:nil] lastObject];
            }
            NSMutableArray *set3 = [[NSMutableArray alloc] init];
            for (int i = 0; i < 6; i++) {
                [set3 addObject:[UIImage imageNamed:[NSString stringWithFormat:@"%d-.png", i]]];
                cell.selectionStyle = UITableViewCellSelectionStyleNone;
            }
            isp3 = [[InfiniteScrollPicker alloc] initWithFrame:CGRectMake(0, -20, 385, 240)];
            [isp3 setImageAry:set3];
            [isp3 setHeightOffset:20];
            [isp3 setPositionRatio:2];
            [isp3 setAlphaOfobjs:0.8];
            [cell.contentView addSubview:isp3];
            return cell;
    }else {
        CityTwoTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CityTwoTableViewCell"];
        if (cell == nil) {
            cell = [[[NSBundle mainBundle] loadNibNamed:@"CityTwoTableViewCell" owner:self options:nil] lastObject];
        }
        return cell;
    }
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
